#include<iostream>
using std::cin;
using std::cout;
using std::endl;
int a[10];
void memset(int* a);
int main(){
	int x1,i;
	int x2,x3;
	int x,y,z; 
	for(i=123;i<=329;i++){
		memset(a);
		x1=i;
		x2=2*x1;
		x3=3*x1;
		x=x1/100;
		y=x1/10%10;
		z=x1%10;
		if(a[x]==0) a[x]++;
		else continue;
		if(a[y]==0) a[y]++;
		else continue;
		if(a[z]==0) a[z]++;
		else continue;	
		x=x2/100;
		y=x2/10%10;
		z=x2%10;
		if(a[x]==0) a[x]++;
		else continue;
		if(a[y]==0) a[y]++;
		else continue;
		if(a[z]==0) a[z]++;
		else continue;	
		x=x3/100;
		y=x3/10%10;
		z=x3%10;
		if(a[x]==0) a[x]++;
		else continue;
		if(a[y]==0) a[y]++;
		else continue;
		if(a[z]==0) a[z]++;
		else continue;	
		cout<<i<<" "<<2*i<<" "<<3*i<<endl;
	};
	return 0;
}
void memset(int* a){
	a[0]=1;
	for(int i=1;i<=9;i++){
		a[i]=0;
	};
}
